package org.example.erpapiservicespringmongoimpl.doc;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

@Document(collection = "product")
public class ProductDoc {
    @Id
    private Integer id;
    private String brand;
    private String name;
    private String barCode;
    private String quantityPerUnit;
    private BigDecimal unitPrice;
    private Integer unitsInStock;
    private Integer unitsSell;
    private Integer unitsTotal;
    private String photo;
    private String photoUrl;
    private CaDoc category =new CaDoc();
    @DBRef
    private List<SimpleSupplierDoc> suppliers =  new ArrayList<>();

    public CaDoc getCategory() {
        return category;
    }

    public void setCategory(CaDoc category) {
        this.category = category;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getBarCode() {
        return barCode;
    }

    public void setBarCode(String barCode) {
        this.barCode = barCode;
    }

    public String getQuantityPerUnit() {
        return quantityPerUnit;
    }

    public void setQuantityPerUnit(String quantityPerUnit) {
        this.quantityPerUnit = quantityPerUnit;
    }

    public BigDecimal getUnitPrice() {
        return unitPrice;
    }

    public void setUnitPrice(BigDecimal unitPrice) {
        this.unitPrice = unitPrice;
    }

    public Integer getUnitsInStock() {
        return unitsInStock;
    }

    public void setUnitsInStock(Integer unitsInStock) {
        this.unitsInStock = unitsInStock;
    }

    public Integer getUnitsSell() {
        return unitsSell;
    }

    public void setUnitsSell(Integer unitsSell) {
        this.unitsSell = unitsSell;
    }

    public Integer getUnitsTotal() {
        return unitsTotal;
    }

    public void setUnitsTotal(Integer unitsTotal) {
        this.unitsTotal = unitsTotal;
    }

    public String getPhoto() {
        return photo;
    }

    public void setPhoto(String photo) {
        this.photo = photo;
    }

    public String getPhotoUrl() {
        return photoUrl;
    }

    public void setPhotoUrl(String photoUrl) {
        this.photoUrl = photoUrl;
    }

    public List<SimpleSupplierDoc> getSuppliers() {
        return suppliers;
    }

    public void setSuppliers(List<SimpleSupplierDoc> suppliers) {
        this.suppliers = suppliers;
    }
}
